
const express = require('express');
const { testUser } = require('../middleware/users');
const { loginHandle, regHandle } = require('../controller/users');

// 创建路由
const router = express.Router();

// 写登陆接口
// router.use('/login', 中间件函数 , 路由处理函数)
router.get('/login', testUser, loginHandle);

router.get('/reg', testUser, regHandle);


// 模块导出
module.exports = router;
